<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
  <my-cpn></my-cpn>
  <my-cpn></my-cpn>
</div>

<script src="../js/vue.js"></script>
<script>


  //1.创建组件构造器对象
  const cpnC = Vue.extend({
    template: `<div>  <h2>wj</h2>
  <p>hahaha</p>
  <p>xixixi</p></div>`
  })

  //2.注册组件
    Vue.component('my-cpn',cpnC)


    const  app = new Vue({
      el:'#app',
      data:{
        message: '卢本伟牛逼！'
      }
    })
</script>
</body>
</html>